import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  editBtn: false,
  addBtn: false,
  delBtn: false,
  selection: true,
  tip: false,
  column: [
    {
      type: 'input',
      label: '主键ID',
      prop: 'id',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '唯一编码（用于关联附件）',
      prop: 'unid',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '制单人ID',
      prop: 'createId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '制单人所属OU的ID',
      prop: 'deptId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改人信息',
      prop: 'updateBy',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改时间',
      prop: 'updateTime',
      span: 12,
      hide: true
    },
    {
      type: 'select',
      label: '状态',
      prop: 'status',
      span: 12,
      dicUrl: `${services.adminService}dict/type/receive_status`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      search: true
    },
    {
      type: 'input',
      label: '领用单号',
      prop: 'caseid',
      span: 12,
      width: 165,
      search: true
    },
    {
      type: 'input',
      label: '制单人',
      prop: 'createBy',
      span: 12,
      search: true,
      hide: true
    },
    {
      type: 'number',
      label: '入库金额',
      span: 24,
      display: true,
      prop: 'amountList',
      hide: true,
      search: true
    },
    {
      type: 'datetime',
      label: '领用日期',
      prop: 'createTime',
      span: 12,
      width: 135,
      searchSpan: 12,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      search: true,
      searchRange: true
    },
    {
      type: 'input',
      label: '领用人单位名称',
      prop: 'deptFullname',
      span: 12,
      width: 120
    },
    {
      type: 'datetime',
      label: '出库时间',
      prop: 'outTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      searchSpan: 12,
      search: true,
      searchRange: true
    },
    {
      type: 'input',
      label: '使用人',
      prop: 'userName',
      span: 12,
      width: 90,
      search: true
    },
    {
      type: 'input',
      label: '使用人所属OU的名称',
      prop: 'userOuname',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '领用仓库名称',
      prop: 'outhouseName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '存放房间名称',
      prop: 'inhouseName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '存放位置名称',
      prop: 'inlocationName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '领用说明',
      prop: 'explains',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '总价格',
      prop: 'amount',
      span: 12
    },
    {
      type: 'input',
      label: '资产明细',
      prop: 'detailedEx',
      span: 12,
      width: 160
    },
    {
      type: 'input',
      label: '使用人ID',
      prop: 'userId',
      span: 12,
      hide: true
    },
    {
      type: 'tree',
      label: '使用部门',
      prop: 'userOuid',
      span: 12,
      dicUrl: `${services.adminService}dept/tree`,
      dicMethod: 'get',
      props: { label: 'name', value: 'id' },
      search: true,
      hide: true
    },
    {
      type: 'input',
      label: '使用人所属OU的全称',
      prop: 'userOufullname',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '领用仓库ID',
      prop: 'outhouseId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '领用仓库全名称',
      prop: 'fullLocation',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '货币类型',
      prop: 'currencyType',
      span: 12,
      hide: true
    },
    {
      type: 'tree',
      label: '存放房间',
      prop: 'inhouseId',
      props: { label: 'name', value: 'idCard' },
      dicUrl: `${services.spaceService}fyroomhouse/tree`,
      dicMethod: 'get',
      span: 12,
      search: true,
      hide: true
    },
    {
      type: 'input',
      label: '存放位置id',
      prop: 'inlocationId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放地点全名称',
      prop: 'infullLocation',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '资产名称',
      span: 24,
      display: true,
      prop: 'cardName',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '资产编码',
      span: 24,
      display: true,
      prop: 'cardCode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '商品条码',
      span: 24,
      display: true,
      prop: 'barcode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '规格型号',
      span: 24,
      display: true,
      prop: 'model',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '入库数量',
      span: 24,
      display: true,
      prop: 'quantity',
      hide: true,
      search: true
    }
  ]
}
export const withdrawalOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  editBtn: false,
  addBtn: false,
  delBtn: false,
  selection: true,
  tip: false,
  column: [
    {
      type: 'input',
      label: '主键ID',
      prop: 'id',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '唯一编码（用于关联附件）',
      prop: 'unid',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '制单人ID',
      prop: 'createId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '制单人所属OU的ID',
      prop: 'deptId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改人信息',
      prop: 'updateBy',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改时间',
      prop: 'updateTime',
      span: 12,
      hide: true
    },
    {
      type: 'select',
      label: '状态',
      prop: 'status',
      span: 12,
      dicUrl: `${services.adminService}dict/type/receive_status`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      search: true
    },
    {
      type: 'input',
      label: '退库单号',
      prop: 'caseid',
      span: 12,
      width: 165,
      search: true
    },
    {
      type: 'input',
      label: '制单人',
      prop: 'createBy',
      span: 12,
      search: true,
      hide: true
    },
    {
      type: 'number',
      label: '退库金额',
      span: 24,
      display: true,
      prop: 'amountList',
      hide: true,
      search: true
    },
    {
      type: 'datetime',
      label: '退库日期',
      prop: 'createTime',
      span: 12,
      width: 135,
      searchSpan: 12,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      search: true,
      searchRange: true
    },
    {
      type: 'input',
      label: '退库人单位名称',
      prop: 'deptFullname',
      span: 12,
      width: 120
    },
    {
      type: 'datetime',
      label: '退库时间',
      prop: 'outTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'input',
      label: '退库人',
      prop: 'userName',
      span: 12,
      width: 90,
      search: true
    },
    {
      type: 'input',
      label: '退库人所属OU的名称',
      prop: 'userOuname',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '退库仓库名称',
      prop: 'outhouseName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '存放房间名称',
      prop: 'inhouseName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '存放位置名称',
      prop: 'inlocationName',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '退库说明',
      prop: 'explains',
      span: 12,
      width: 100
    },
    {
      type: 'input',
      label: '总价格',
      prop: 'amount',
      span: 12
    },
    {
      type: 'input',
      label: '资产明细',
      prop: 'detailedEx',
      span: 12,
      width: 160
    },
    {
      type: 'input',
      label: '使用人ID',
      prop: 'userId',
      span: 12,
      hide: true
    },
    {
      type: 'tree',
      label: '使用部门',
      prop: 'userOuid',
      span: 12,
      dicUrl: `${services.adminService}dept/tree`,
      dicMethod: 'get',
      props: { label: 'name', value: 'id' },
      searchLabelWidth: 90,
      search: true,
      hide: true
    },
    {
      type: 'input',
      label: '使用人所属OU的全称',
      prop: 'userOufullname',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '领用仓库ID',
      prop: 'outhouseId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '领用仓库全名称',
      prop: 'fullLocation',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '货币类型',
      prop: 'currencyType',
      span: 12,
      hide: true
    },
    {
      type: 'tree',
      label: '存放房间',
      prop: 'inhouseId',
      props: { label: 'name', value: 'idCard' },
      dicUrl: `${services.spaceService}fyroomhouse/tree`,
      dicMethod: 'get',
      span: 12,
      search: true,
      hide: true
    },
    {
      type: 'input',
      label: '存放位置id',
      prop: 'inlocationId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放地点全名称',
      prop: 'infullLocation',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '资产名称',
      span: 24,
      display: true,
      prop: 'cardName',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '资产编码',
      span: 24,
      display: true,
      prop: 'cardCode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '商品条码',
      span: 24,
      display: true,
      prop: 'barcode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '规格型号',
      span: 24,
      display: true,
      prop: 'model',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '退库数量',
      span: 24,
      display: true,
      prop: 'quantity',
      hide: true
    }
  ]
}
